package cn.rkylin.oms.system.supplier.dao;

import cn.rkylin.oms.common.dto.PagedData;
import cn.rkylin.oms.system.supplier.domain.SearchConditions;
import cn.rkylin.oms.system.supplier.domain.Supplier;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface ISupplierDao {
    void create(Supplier supplier) throws Exception;
    void update(Supplier supplier) throws Exception;
    void delete(String id) throws Exception;
    PagedData<Supplier> search(Pageable pageable, SearchConditions conditions) throws Exception;
    PagedData<Supplier> search(Pageable pageable, Map<String, Object> conditions) throws Exception;
    
    /**
     * 得到供应商列表
     * 
     * @param supplier 供应商bean
     * @return 供应商列表
     * @throws Exception 异常
     */
    public List<Supplier> getSupplierList(Supplier supplier) throws Exception;
}
